<div class="row">
    <div class="col-lg-12">
        <div class="wrapper wrapper-content animated fadeInUp">
            <div class="ibox-content m-b-sm border-bottom">
                <div class="text-center p-lg">
                    <div class="alert alert-${msg_type!}">
                       <h2>${msg_detail!}</h2>
                     </div>
                    <span>如果您不做出选择,将在</span> <span id="spanSeconds">3</span> 秒后跳转到第一个链接地址。
                    <div class="well">
                        <a href="#" onClick="ajaxContent('${default_url!}')">${_res["system.message.success.return"]}</a>
                         <%for (var link in links!){%>
                           <a href="${link.Value!}">${link.Key!}</a>
                         <%}%>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" language="JavaScript">
   var seconds ;
   var defaultUrl = "${default_url!}";
   var timeID;
  
   function redirection() {
       if (seconds <= 0) {
           window.clearInterval(timeID);
           return;
       }
       seconds--;
       document.getElementById('spanSeconds').innerHTML = seconds;

       if (seconds == 0) {
           window.clearInterval(timeID);
           ajaxContent(defaultUrl);
       }
   }
   
   $(document).ready(function(){
		seconds = 3;
	    if (defaultUrl == 'javascript:history.go(-1)' && window.history.length == 0) {
	        return;
	    }
	    timeID = window.setInterval(redirection, 1000);
 	}); 
</script>
